<script>
import {useRouter} from "vue-router";
import {defineComponent, ref, toRefs, reactive, onMounted, onActivated, onDeactivated,watch} from "vue";

export default defineComponent({
  setup(){

    const router = useRouter();
    function backToIndex(){
        const steps = sessionStorage.getItem('backTime');
        console.log(steps)
        router.go(-steps);
    }
    return{
        backToIndex,
    }
  }
})

</script>

<template>
    <div class="appHeader bg-light">
        <div class="left" @click="backToIndex">
            <i class="ion ion-ios-arrow-back" style="font-size: 24px"></i>
        </div>
    </div>
    <div id="appCapsule">
        <img src="../assets/img/congratulations.png" alt="">
        <h2 class="text-center">恭喜你完成了今天的任务</h2>
    </div>
    
</template>

<style scoped lang="scss">
img{
    width: 30%;
    display: block;
    margin: 0 auto;
}
</style>